package com.dlc.shop.bean.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dlc.shop.bean.dto.StockPointSkuDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 出入库商品项
 *
 * @author LGH
 * @date 2021-09-09 13:11:15
 */
@Data
@TableName("tz_stock_bill_log_item")
public class StockBillLogItem implements Serializable{
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "出入库商品项id" )
    private Long stockBillLogItemId;

    @Schema(description = "出入库明细id" )
    private Long stockBillLogId;

    @Schema(description = "实际出入库数量" )
    private Integer stockCount;

    @Schema(description = "商品库存剩余量" )
    private Integer afterStock;

    @TableField(exist = false)
    @Schema(description = "单位" )
    private String unit;

    @Schema(description = "出入库单号" )
    @TableField(exist = false)
    private String stockBillNo;

    @Schema(description = "关联订单号" )
    @TableField(exist = false)
    private String sourceOrderNo;

    @Schema(description = "单据类型" )
    @TableField(exist = false)
    private Integer stockBillType;

    @Schema(description = "创建时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date createTime;

    @Schema(description = "成本单价" )
    private Double unitPrice;

    @Schema(description = "销售价格")
    private Double price;

    @Schema(description = "商品id" )
    private Long prodId;

    @TableField(exist = false)
    @Schema(description = "商品名称" )
    private String prodName;

    @Schema(description = "skuId" )
    private Long skuId;

    @Schema(description = "商品编码" )
    @TableField(exist = false)
    private String partyCode;

    @Schema(description = "sku名称" )
    @TableField(exist = false)
    private String skuName;

    @Schema(description = "备注" )
    private String remark;

    @Schema(description = "商品图片" )
    @TableField(exist = false)
    private String pic;

    @Schema(description = "sku总库存" )
    @TableField(exist = false)
    private Integer stocks;

    @Schema(description = "制单人手机号" )
    @TableField(exist = false)
    private String employeeMobile;

    @Schema(description = "制单人昵称")
    @TableField(exist = false)
    private String makerName;

    @Schema(description = "1：出库 2：入库" )
    @TableField(exist = false)
    private Integer stockType;

    @Schema(description = "关联的商品状态" )
    @TableField(exist = false)
    private Integer status;

    @Schema(description = "商品是否已删除" )
    @TableField(exist = false)
    private Integer isDelete;

    @Schema(description = "库存点id" )
    @TableField(exist = false)
    private Long stockPointId;

    @Schema(description = "库存点类型" )
    @TableField(exist = false)
    private Integer stockPointType;

    @Schema(description = "仓库类型 0默认仓库，1区域仓库")
    @TableField(exist = false)
    private Integer warehouseType;

    @Schema(description = "库存点名称" )
    @TableField(exist = false)
    private String stockPointName;

    @Schema(description = "关联库存数量" )
    @TableField(exist = false)
    private List<StockPointSkuDTO> stockPointSkuList;

}
